<template>
  <view class="template-hot tn-safe-area-inset-bottom">
    <!-- 顶部自定义导航 -->
    <tn-nav-bar fixed alpha customBack>
      <view slot="back" class='tn-custom-nav-bar__back'
        @click="goBack">
        <text class='icon tn-icon-left'></text>
        <text class='icon tn-icon-home-capsule-fill'></text>
      </view>
    </tn-nav-bar>
    
     
   <view class="tn-search-fixed">
     <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin" :style="{marginTop: vuex_custom_bar_height + 'px'}">
	   <view class="justify-content-item tn-text-df tn-color-grey">
	   		 <text class="tn-padding-xs">筛选</text>
	   		 <text class="tn-icon-filter"></text>
	   </view>
	   <view class="justify-content-item align-content-item">
         <view class="tn-bg-gray--light tn-flex tn-flex-col-center" style="border-radius: 100rpx;padding: 10rpx 20rpx 10rpx 20rpx;width: 100%;">
           <text class="tn-icon-search justify-content-item tn-padding-right-xs tn-color-gray tn-text-lg"></text>
           <input class="justify-content-item" placeholder="想搜点什么咧" name="input" placeholder-style="color:#AAAAAA" ></input>
         </view>
       </view>
       
       <view class="align-content-item">
         <view class="justify-content-item tn-text-center">
           <tn-button backgroundColor="#82B2FF" shape="round" padding="20rpx 20rpx" width="150rpx" shadow fontBold @tap="">
             <text class="tn-color-white">搜 索</text>
           </tn-button>
         </view>
       </view>
     </view>
   </view>
   
   <view class="tn-info__container tn-flex tn-flex-wrap tn-flex-col-center tn-flex-row-between tn-margin-left tn-margin-right" >
     <block v-for="(item, index) in reserve" :key="index">
       <view class="article-shadow tn-margin-sm" style="margin: 2px 10px;" @click="tn('/circlePages/king')">
         <view class="tn-flex">
           <view class="image-pic tn-margin-sm" :style="'background-image:url(' + item.userAvatar + ')'">
             <view class="image-article">
             </view>
           </view>
           <view class="tn-margin-sm tn-padding-top-xs" style="width: 100%;">
             <view class="tn-text-lg tn-text-bold clamp-text-1 tn-text-justify">
               {{ item.title }}
             </view>
             <view class="tn-flex tn-flex-row-between tn-flex-col-between tn-padding-top-xs" style="min-height: 70rpx;">
               <view class="justify-content-item tn-flex tn-flex-col-center">
                 <text class="info">{{ item.info }}</text>
               </view>
             </view>
             <view class="tn-flex tn-flex-row-between tn-flex-col-between">
              <view class="justify-content-item tn-flex tn-flex-col-center">
                <text class="info">{{ item.desc }}</text>
              </view>
             </view>
           </view>
         </view>
       </view>
     </block>
   </view>
    

    
  </view>
</template>

<script>
  import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
  export default {
    name: 'People',
    mixins: [template_page_mixin],
    data(){
      return {
        cardCur: 0,
        
        reserve: [{
            userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg',
            title: '马云',
            desc: '上市公司·其他·未婚',
            info: '30岁·鸡·174cm·本科·20-30万',
          },
          {
            userAvatar: 'https://resource.tuniaokj.com/images/blogger/blogger_beibei.jpg',
            title: '马化腾',
        	desc: '上市公司·其他·未婚',
        	info: '30岁·鸡·174cm·本科·20-30万',
          },
          {
            userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg',
            title: '马斯克',
            desc: '上市公司·其他·未婚',
            info: '30岁·鸡·174cm·本科·20-30万',
          },
          {
            userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg',
            title: '雷军',
            desc: '上市公司·其他·未婚',
            info: '30岁·鸡·174cm·本科·20-30万',
          },
          {
            userAvatar: 'https://resource.tuniaokj.com/images/shop/phonecase2.jpg',
            label: ['回母校'],
            title: '胡志明',
            desc: '上市公司·其他·未婚',
            info: '30岁·鸡·174cm·本科·20-30万',
          },
          {
            userAvatar: 'https://resource.tuniaokj.com/images/shop/watch1.jpg',
            title: '小明',
            desc: '上市公司·其他·未婚',
            info: '30岁·鸡·174cm·本科·20-30万',
          },
          {
            userAvatar: 'https://resource.tuniaokj.com/images/shop/sticker.jpg',
            title: '董小姐',
            desc: '上市公司·其他·未婚',
            info: '30岁·鸡·174cm·本科·20-30万',
          },
          {
            userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg',
            title: '甜心',
            desc: '上市公司-其他-未婚',
            info: '30岁·鸡·174cm·本科·20-30万',
          }
        ],
      }
    },
    methods: {
      // cardSwiper
      cardSwiper(e) {
        this.cardCur = e.detail.current
      },
      // 跳转
      tn(e) {
      	uni.navigateTo({
      		url: e,
      	});
      },
    }
  }
</script>

<style lang="scss" scoped>
  .template-plan{
  }
  /* 胶囊*/
  .tn-custom-nav-bar__back {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 1000rpx;
    border: 1rpx solid rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
    font-size: 18px;
    
    .icon {
      display: block;
      flex: 1;
      margin: auto;
      text-align: center;
    }
    
    &:before {
      content: " ";
      width: 1rpx;
      height: 110%;
      position: absolute;
      top: 22.5%;
      left: 0;
      right: 0;
      margin: auto;
      transform: scale(0.5);
      transform-origin: 0 0;
      pointer-events: none;
      box-sizing: border-box;
      opacity: 0.7;
      background-color: #FFFFFF;
    }
  }
  
  /* 轮播 start*/
  .card-swiper {
    height: 570rpx !important;
  }
  
  .card-swiper swiper-item {
    width: 450rpx !important;
    left: 30rpx;
    box-sizing: border-box;
    padding: 0rpx 0rpx 80rpx 0rpx;
    overflow: initial;
  }
  
  .card-swiper swiper-item .swiper-item {
    width: 100%;
    display: block;
    height: 100%;
    border-radius: 10rpx;
    transform: scale(0.7) translate(0rpx,-104rpx);
    transition: all 0.3s ease-in 0s;
    will-change: transform;
    // overflow: hidden;
  }
  
  .card-swiper swiper-item.cur .swiper-item {
    transform: none;
    transition: all 0.3s ease-in 0s;
    will-change: transform;
  }
  
  .card-swiper swiper-item .swiper-item-text {
    margin-top: -100rpx;
    width: 100%;
    display: block;
    height: 50%;
    border-radius: 10rpx;
    transform: translate(20rpx, -30rpx) scale(0.7, 0.7);
    transition: all 0.4s ease 0s;
    will-change: transform;
    overflow: hidden;
    color: #000000;
    // background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0));
    height: 140rpx;
  }
  
  .card-swiper swiper-item.cur .swiper-item-text {
    margin-top: -150rpx;
    padding-left: 30rpx;
    width: 500rpx !important;
    transform: translate(-25rpx, 20rpx) scale(0.9, 0.9);
    transition: all 0.4s ease 0s;
    will-change: transform;
    color: #FFFFFF;
    text-shadow: 0rpx 10rpx 20rpx rgba(0,0,0,0.1);
    // background-image: linear-gradient(rgba(255, 255, 255, 0.01), rgba(0, 0, 0, 0.4));
    height: 137rpx;
  }
  
  .image-banner{
    display: flex;
    align-items: center;
    justify-content: center;
    // border: 1rpx solid red;
  }
  .image-banner image{
    width: 100%;
    height: 100%;
  }
  /* 轮播指示点 start*/
  .indication{
    z-index: 9999;
    width: 100%;
    height: 36rpx;
    position: absolute;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:center;
  }
  
  .spot{
    background-color: #000;
    opacity: 0.4;
    width: 10rpx;
    height: 10rpx;
    border-radius: 20rpx;
    margin: 0 8rpx !important;
    right: -270rpx;
    top: -100rpx;
    position: relative;
  }
  
  .spot.active{
    opacity: 1;
    width: 10rpx;
    background-color: #000;
  }
  
  /* 计划内容 start*/
  .tn-plan-content {
    &__item {
      display: inline-block;
      line-height: 45rpx;
      padding: 10rpx 30rpx;
      margin: 20rpx 20rpx 5rpx 0rpx;
      
      &--prefix {
        padding-right: 10rpx;
      }  
    }
  }
  .tn-plan-content2 {
    &__item {
      line-height: 45rpx;
      padding: 15rpx 30rpx;
      margin: 30rpx 0rpx 10rpx 0rpx;
      
      &--prefix {
        padding-right: 10rpx;
      }  
    }
  }
  /* 计划内容 end*/
  
  /* 资讯主图 start*/
  .image-article {
    border-radius: 8rpx;
    border: 1rpx solid #F8F7F8;
    width: 200rpx;
    height: 200rpx;
    position: relative;
  }
  
  .image-pic {
    background-size: cover;
    background-repeat: no-repeat;
    // background-attachment:fixed;
    background-position: top;
    border-radius: 10rpx;
  }
  
  .article-shadow {
    border-radius: 15rpx;
    box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  }
  
  /* 文字截取*/
  .clamp-text-1 {
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  
  .clamp-text-2 {
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  
  /* 标签内容 start*/
  .tn-tag-content {
    &__item {
      display: inline-block;
      line-height: 35rpx;
      padding: 5rpx 25rpx;
  
      &--prefix {
        padding-right: 10rpx;
      }
    }
  }
</style>
